﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntranceApp
{
    class Client
    {

        //fields
        private string account_id;
        private string first_name;
        private string last_name;
        private DateTime date_birth;
        private string rfid;
        private string address;
        private string zipcode;
        private string email;
        private double balance;
        private bool in_event;
        private string password;
        private string bank_account;
        private string campspot_id;


        //properties
        public string Account_id { get { return account_id; } set { account_id = value; } }
        public string First_name { get { return first_name; } set { first_name = value; } }
        public string Last_name { get { return last_name; } set { last_name = value; } }
        public string Rfid { get { return rfid; } set { rfid = value; } }
        public string Address { get { return address; } set { address = value; } }
        public string ZipCode { get { return zipcode; } set { zipcode = value; } }
        public string Email { get { return email; } set { email = value; } }
        public DateTime Date_birth { get { return date_birth; } set { date_birth = value; } }
        public double Balance { get { return balance; } set { balance = value; } }
        public bool In_event { get { return in_event; } set { in_event = value; } }
        public string Bank_account { get { return bank_account; } set { bank_account = value; } }
        public string Campspot_id { get { return campspot_id; } set { campspot_id = value; } }
        public string Password { get { return password; } set { password = value; } }

        //constructor for register the client

        public Client(string account_id, string firstName, string lastName, string rfid, string address, string zipCode, string email, DateTime date_birth, double balance, bool in_event, string password, string bankAccount, string campspot_id)
        {
            this.account_id = account_id;
            this.first_name = firstName;
            this.last_name = lastName;
            this.rfid = rfid;
            this.address = address;
            this.zipcode = zipCode;
            this.email = email;
            this.date_birth = date_birth;
            this.balance = balance;
            this.in_event = in_event;
            this.bank_account = bankAccount;
            //this.campspotId = campspotId;
            this.password = password;


        }
        //constructor for client when he is borowins somthing or etc...
        public Client(string firstName, string lastName, string account_id, double balance,DateTime date_birth)
        {
            this.first_name = firstName;
            this.last_name = lastName;
            this.account_id = account_id;
            this.balance = balance;
            this.date_birth = date_birth;
        }


        public override string ToString()
        {
            return "AccountNumber : " + Convert.ToString(account_id).PadLeft(6, '0') + ";" + first_name + " " + last_name + ",Balance : $ " + balance;
        }

    }
}
